<template>
  <div class="center-control-panel">
    <!-- 前轮X轴 -->
    <div class="axis-row">
      <div class="axis-label">前轮X轴</div>
      <div class="axis-content">
        <div class="axis-left">
          <img src="../assets/X_bkimage.png" class="axis-img" />
          <div class="axis-status">
            <div class="status-item">&gt; 前限</div>
            <div class="status-item">● 初始点</div>
            <div class="status-item">&lt; 后限</div>
          </div>
        </div>
        <div class="axis-middle">
          <div class="input-row">
            <label>设定位置(mm):</label>
            <input type="text" placeholder="请输入数值" />
          </div>
          <div class="input-row">
            <label>设定速度(mm/s):</label>
            <input type="text" placeholder="请输入数值" />
          </div>
          <div class="input-row">
            <label>当前位置(mm):</label>
            <input type="text" />
          </div>
          <div class="input-row">
            <label>当前速度(mm/s):</label>
            <input type="text" />
          </div>
        </div>
        <div class="axis-right">
          <div class="btn-row"><button>前移</button></div>
          <div class="btn-row"><button>后移</button></div>
          <div class="btn-row"><button>定位</button></div>
          <div class="btn-row"><button>归位</button></div>
        </div>
      </div>
    </div>
    <!-- 后轮X轴 -->
    <div class="axis-row axis-row-rear">
      <div class="axis-label">后轮X轴</div>
      <div class="axis-content">
        <div class="axis-left">
          <img src="../assets/X_bkimage.png" class="axis-img" />
          <div class="axis-status">
            <div class="status-item">&gt; 前限</div>
            <div class="status-item">● 初始点</div>
            <div class="status-item">&lt; 后限</div>
          </div>
        </div>
        <div class="axis-middle">
          <div class="input-row">
            <label>设定位置(mm):</label>
            <input type="text" placeholder="请输入数值" />
          </div>
          <div class="input-row">
            <label>设定速度(mm/s):</label>
            <input type="text" placeholder="请输入数值" />
          </div>
          <div class="input-row">
            <label>当前位置(mm):</label>
            <input type="text" />
          </div>
          <div class="input-row">
            <label>当前速度(mm/s):</label>
            <input type="text" />
          </div>
        </div>
        <div class="axis-right">
          <div class="btn-row"><button>前移</button></div>
          <div class="btn-row"><button>后移</button></div>
          <div class="btn-row"><button>定位</button></div>
          <div class="btn-row"><button>归位</button></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 这里可根据需要添加props、emit等
</script>

<style scoped>
.center-control-panel {
  width: 100%;
  background: #f3f3f3;
  border-radius: 8px;
  padding: 24px 0;
}
.axis-row {
  background: #fff;
  border-radius: 4px;
  margin: 0 auto 16px auto;
  max-width: 1200px;
  box-shadow: none;
  border: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.axis-row-rear {
  background: #f7f7ff;
}
.axis-label {
  font-size: 18px;
  font-weight: bold;
  margin: 12px 0 0 24px;
}
.axis-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 8px 0 16px 0;
}
.axis-left {
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
}
.axis-img {
  width: 80px;
  height: 64px;
  margin-bottom: 8px;
}
.axis-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.status-item {
  color: #888;
  font-size: 14px;
}
.axis-middle {
  width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 24px;
}
.input-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.input-row label {
  width: 120px;
  text-align: right;
  margin-right: 8px;
  color: #222;
  font-size: 15px;
}
.input-row input {
  width: 160px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 15px;
}
.axis-right {
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 32px;
}
.btn-row {
  margin-bottom: 16px;
}
.axis-right button {
  width: 100%;
  height: 32px;
  font-size: 15px;
  border-radius: 4px;
  border: 1px solid #d0d0d0;
  background: #f7f7f7;
  color: #666;
  cursor: pointer;
}
</style>
